package com.example.sysao.utils;

import java.util.HashMap;

public class ResponseMap extends HashMap<String, Object> {
    public ResponseMap() {
        put("success", true);
    }

    public static ResponseMap success() {

        return new ResponseMap();

    }

    public static ResponseMap success(String msg) {
        ResponseMap map = new ResponseMap();
        map.put("msg", msg);
        return new ResponseMap();

    }

    public static ResponseMap error() {
        ResponseMap map = new ResponseMap();
        map.put("success", false);
        return new ResponseMap();

    }

    public static ResponseMap error(String msg) {
        ResponseMap map = new ResponseMap();
        map.put("success", false);
        map.put("msg", msg);
        return new ResponseMap();
    }
}
